<template>
  <div class="containBox">
    <div class="title-name">{{titleName}}</div>
    <div class="digital digital0">
      <div class="title">{{program}}</div>
      <div>
        <span class="subtitle" :class="{active:index == num}" v-for="(item,index) in items"
            @click="tab(index)">{{item["subTitle"]}}</span>
      </div>
      <div class="case-contain" v-for="(item,index) in items" v-show="index == num">
        <img v-lazy="item['src']" alt="">
        <router-link class="path-to" tag="span" :to="item.path">查看更多 ></router-link>
      </div>
    </div>
    <div class="second">
      <div class="digital digital1">
        <div class="title">{{boxTitle}}</div>
        <span class="subtitle" :class="{active:index == boxNum}" v-for="(item,index) in items1" @click="tabBox(index)">{{item.subTitle}}</span>
        <div class="case-contain case-box" v-for="(item,index) in items1" v-show="index == boxNum">
          <img v-lazy="item['src']" alt="">
          <router-link class="path-to" tag="span" :to="item.path">查看更多 ></router-link>
        </div>
      </div>
      <div class="digital digital2">
        <div class="title">{{digital}}</div>
        <span class="osubtitle" v-for="(item,index) in items2">{{item.subTitle}}</span>
        <div class="case-contain case-box" v-for="(item,index) in items2" v-show="index == digitalNum">
          <img v-lazy="item['src']" alt="">
          <router-link class="path-to" tag="span" :to="item.path">查看更多 ></router-link>
        </div>
      </div>
    </div>
    <div class="digital digital3">
      <div class="title">{{extendTitle}}</div>
      <ul class="extend">
        <li v-for="item in extend">
          <img v-lazy="item['src']" alt="">
          <p>{{item["name"]}}</p>
        </li>
      </ul>
    </div>
    <hr>
    <div class="vCloud">
      <div class="title">
        {{vCloud[0].title}}
      </div>
      <div class="case-contain">
        <img v-lazy="vCloud[0]['src']" alt="">
        <router-link class="path-to" tag="span" to="/VirtualCloud">查看更多 ></router-link>
      </div>
    </div>
    <hr>
  </div>
</template>
<script>
  export default{
    data(){
      return {
        num: 0,
        boxNum: 0,
        digitalNum: 0,
        titleName: "数字标牌",
        program: "方案",
        items: [
          {
            subTitle: "影院",
            src: require('../assets/ad.jpg'),
            path: "/cinema"
          },
          {
            subTitle: "餐饮",
            src: require('../assets/ct.jpg'),
            path: "/catering"
          },
          {
            subTitle: "商超",
            src: require('../assets/su.jpg'),
            path: "/super"
          }
        ],
        boxTitle: "网络播放盒",
        items1: [
          {
            subTitle: "基础版",
            src: require('../assets/basic.jpg'),
            path: "/basic"
          },
          {
            subTitle: "联动版",
            src: require('../assets/box.jpg'),
            path: "/linkage"
          },
          {
            subTitle: "特效版",
            src: require('../assets/special-box.jpg'),
            path: "/special"
          }
        ],
        digital: "数字灯箱",
        items2: [
          {
            subTitle: "在电视上直接安装我们的APP客户端，不仅节省了开支而且提高了人气",
            src: require('../assets/light-box.jpg'),
            path: "/oneMachine"
          }
        ],
        extendTitle: "配套软件及扩展功能",
        extend: [
          {
            name: "Aten系统信息发布系统",
            src: require("../assets/Aten.png")
          },
          {
            name: "Aten终端app",
            src: require("../assets/AtenTerminal.png")
          },
          {
            name: "Aten白板涂鸦",
            src: require("../assets/white.png")
          },
          {
            name: "人脸识别",
            src: require("../assets/face.png")
          },
          {
            name: "体感游戏",
            src: require("../assets/game.png")
          },
          {
            name: "电子标签",
            src: require("../assets/electronic.png")
          }
        ],
        vCloud: [
          {
            title: "虚拟云桌面",
            src: require('../assets/vCloud.png')
          }
        ]
      }
    },
    methods: {
      tab(index){
        this.num = index
      },
      tabBox(index){
        this.boxNum = index
      },
      tabDigital(index){
        this.digitalNum = index
      }
    }
  }
</script>
<style scoped>
  *{
    margin:0;
    padding:0;
  }
  .containBox {
    width: 85%;
    /*font-size: 36px;*/
    color: #505050;
    margin: 0 auto;
  }

  .vCloud > .title {
    font-size: 46px;
    text-align: center;
    margin-bottom: 40px;
    line-height: 46px;
  }

  img {
    width: 100%;
  }

  .title-name {
    margin: 70px 0 40px 0;
    font-size: 46px;
    text-align: center;
    line-height: 46px;
  }

  .title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .subtitle {
    width: 120px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 20px;
    background: #eee;
    text-align: center;
    cursor: pointer;
  }

  .osubtitle {
    width:auto;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 20px;
  }

  .case-contain {
    width: 100%;
    position: relative;
  }

  .case-contain img {
    background: #f7f7f7;
  }

  .path-to {
    display: block;
    position: absolute;
    right: 30px;
    bottom: 40px;
    font-size: 16px;
    background: #fff;
    color: orange;
    cursor: pointer;
    padding: 5px;
  }

  .digital1, .digital2 {
    display: inline-block;
  }

  .digital, .vCloud {
    margin-top: 70px;
  }

  .digital0 {
    margin-top: 40px;
  }

  .digital1,
  .digital2,
  .digital3 {
    margin-top: 50px;
  }
  .extend, .second {
    width: 100%;
    display: -webkit-flex;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .extend {
    width: 100%;
    font-size: 18px;
    text-align: center;
  }

  @media screen and (max-width: 1600px) {
    .extend img {
      width: 96%;
    }
    .case-box img {
      width: 98%;
      display: block;
    }
    .osubtitle {
      margin-right: 0;
    }
  }

  .active {
    background: orange;
    color: #fff;
  }

  hr {
    width:100%;
    border:1px solid #dadada;
    margin-top: 70px;
  }
</style>
